package com.cyzy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cyzy.dao.AttendStudentClassDao;
import com.cyzy.dao.StudentCourseDao;
import com.cyzy.pojo.Attend;
import com.cyzy.pojo.FileInfo;
import com.cyzy.pojo.Student;
import lombok.Data;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.sql.Date;
import java.util.List;

@Mapper
public interface StudentMapper extends BaseMapper<Student> {

    Page<StudentCourseDao> selectStudentsCampusId(Page<StudentCourseDao> page,
                                                  @Param("studentCourseDao") StudentCourseDao studentCourseDao,
                                                  @Param("studentName") String studentName,
                                                  @Param("courseId")Integer courseId);

    List<StudentCourseDao> selectAllStudents(StudentCourseDao studentCourseDao);

    Page<AttendStudentClassDao> attend(Page<AttendStudentClassDao> page,
                                       AttendStudentClassDao attendStudentClassDao,
                                       @Param("classId")Integer classId,
                                       @Param("attendDate") Date attendDate);

    int addAtend(Attend attend);

    int addStudent(Student student);

    int resetPwd(Student student);

    int deleteStudent(Student student);
}
